#ifndef THREAD2_H
#define THREAD2_H

#include <stdint.h>
#include <pthread.h>
#include "log_utils.h"
#include "thread4.h"  // 包含proximity_sensor_t类型定义
#include "thread5.h"  // 包含proximity_sensor2_t类型定义

// TCP连接状态宏定义
#define TCP_CONNECTION_SUCCESS 1
#define TCP_CONNECTION_FAILURE 0

// 全局变量，表示TCP连接状态
extern int g_tcp_connection_status;

// 线程2函数声明
void *thread2_function(void *arg);

// 添加接近传感器状态获取函数声明
extern int get_proximity_sensor_state(proximity_sensor_t *state);
extern int get_proximity_sensor2_state(proximity_sensor2_t *state);

#endif /* THREAD2_H */ 